sgwt_setscales : Compute a set of wavelet scales adapted to spectrum bounds function s=sgwt_setscales(lmin,lmax,Nscales) returns a (possibly good) set of wavelet scales given minimum nonzero and maximum eigenvalues of laplacian returns scales logarithmicaly spaced between minimum and maximum "effective" scales : i.e. scales below minumum or above maximum will yield the same shape wavelet (due to homogoneity of sgwt kernel : currently assuming sgwt kernel g given as abspline with t1=1, t2=2) Inputs : lmin,lmax - minimum nonzero and maximum eigenvalue of Laplacian. Note that in design of transform with scaling function, lmin may be taken just as a fixed fraction of lmax, and may not actually be the smallest nonzero eigenvalue Nscales - # of wavelet scales Outputs : s - wavelet scales
0001 % sgwt_setscales : Compute a set of wavelet scales adapted to spectrum bounds 0002 % 0003 % function s=sgwt_setscales(lmin,lmax,Nscales) 0004 % 0005 % returns a (possibly good) set of wavelet scales given minimum nonzero and 0006 % maximum eigenvalues of laplacian 0007 % 0008 % returns scales logarithmicaly spaced between minimum and maximum 0009 % "effective" scales : i.e. scales below minumum or above maximum 0010 % will yield the same shape wavelet (due to homogoneity of sgwt kernel : 0011 % currently assuming sgwt kernel g given as abspline with t1=1, t2=2) 0012 % 0013 % Inputs : 0014 % lmin,lmax - minimum nonzero and maximum eigenvalue of 0015 % Laplacian. Note that in design of transform with 0016 % scaling function, lmin may be taken just as a fixed 0017 % fraction of lmax, and may not actually be the 0018 % smallest nonzero eigenvalue 0019 % Nscales - # of wavelet scales 0020 % 0021 % Outputs : 0022 % s - wavelet scales 0023 0024 % This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox) 0025 % Copyright (C) 2010, David K. Hammond. 0026 % 0027 % The SGWT toolbox is free software: you can redistribute it and/or modify 0028 % it under the terms of the GNU General Public License as published by 0029 % the Free Software Foundation, either version 3 of the License, or 0030 % (at your option) any later version. 0031 % 0032 % The SGWT toolbox is distributed in the hope that it will be useful, 0033 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0034 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0035 % GNU General Public License for more details. 0036 % 0037 % You should have received a copy of the GNU General Public License 0038 % along with the SGWT toolbox. If not, see <http://www.gnu.org/licenses/>. 0039 0040 0041 function s=sgwt_setscales(lmin,lmax,Nscales) 0042 t1=1; 0043 t2=2; 0044 0045 smin=t1/lmax; 0046 smax=t2/lmin; 0047 s=exp(linspace(log(smin),log(smax),Nscales)); 0048